#
# Attempt to create a scons Pyrex Builder.
# Flavio Codeco Coelho 
#
env = Environment()
SourceSignatures('MD5')#Only rebuild files that have changed
# Creating a Pyrex Builder
pyxbld = Builder(action='pyrexc -o $TARGET $SOURCE')
env.Append(BUILDERS={'Pyrex':pyxbld})
env.Append(CCFLAGS=' -I/usr/include/python2.4/')
# Building primespyx.pyx
env.Pyrex('primespyx.c','primespyx.pyx')
env.SharedLibrary('primespyx',['primespyx.c'])

# After the build You have to rename libprimespyx.so to primespyx.so
# Or you will get an importError.
# Any suggestion on how to stop SharedLibrary from prepending 'lib'
# to the original filename is welcome.
